import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class Demo {
	public static void main(String[] args) {
		ScheduledExecutorService scheduleService = Executors
				.newScheduledThreadPool(1);
		scheduleService.scheduleAtFixedRate(new Runnable() {
			@Override
			public void run() {
				System.out.println("起床了");
			}
		}, 5, 1, TimeUnit.SECONDS);
	}
}
